CUBRID SQL¶
This chapter describes SQL syntax such as data types, functions and operators, data retrieval or table manipulation. You can also find SQL statements used for index, trigger, partition, serial and changing user information.
The main topics covered in this chapter are as follows:
- Writing Rules
- Identifier: Describes how to write, the identifier, string allowed to be used as a name of a table, index, and column.
- Reserved words: Lists reserved words in CUBRID. To use a reserved word as an identifier, enclose the identifier by using double quotes, backticks (`), or brackets ([]).
- Comment
- Literal: Describes how to write constant values.
- Data types: Describes the data types, the format to store data.
- Data Definition Statements: Describes how to create, alter, drop, and rename a table, an index, a view and a serial.
- Operators and Functions: Describes the operators and functions used for query statements.
- Data Manipulation Statements: Describes the SELECT, INSERT, UPDATE, and DELETE statements.
- Query Optimization: Describes the query optimization by using the index, hint, and the index hint syntax.
- Partitioning: Describes how to partition one table into several independent logical units.
- Trigger: Describes how to create, alter, drop, and rename a trigger that is automatically executed in response to certain events.
- Java Stored Functions/Procedures: Describes how to create a Java method and call it in the query statement.
- Method: Describes the method, a built-in function of the CUBRID database system.
- Class Inheritance: Describes how to inherit the attribute from the parent to the child table (class).
- Database Administration: Describes about user management, SET and SHOW statements.
- System Catalog: Describes the CUBRID system catalog, the internal information of the CUBRID database.
- Writing Rules
- Data Types
- Data Definition Statements
- Operators and Functions
- Logical Operators
- Comparison Operators
- Arithmetic Operators
- Set Arithmetic Operators
- Statement Set Operators
- Containment Operators
- BIT Functions and Operators
- String Functions and Operators
- Concatenation Operator
- ASCII
- BIN
- BIT_LENGTH
- CHAR_LENGTH, CHARACTER_LENGTH, LENGTHB, LENGTH
- CHR
- CONCAT
- CONCAT_WS
- ELT
- FIELD
- FIND_IN_SET
- FROM_BASE64
- INSERT
- INSTR
- LCASE, LOWER
- LEFT
- LOCATE
- LPAD
- LTRIM
- MID
- OCTET_LENGTH
- POSITION
- REPEAT
- REPLACE
- REVERSE
- RIGHT
- RPAD
- RTRIM
- SPACE
- STRCMP
- SUBSTR
- SUBSTRING
- SUBSTRING_INDEX
- TO_BASE64
- TRANSLATE
- TRIM
- UCASE, UPPER
- Numeric/Mathematical Functions
- Date/Time Functions and Operators
- ADDDATE, DATE_ADD
- ADDTIME
- ADD_MONTHS
- CURDATE, CURRENT_DATE
- CURRENT_DATETIME, NOW
- CURTIME, CURRENT_TIME
- CURRENT_TIMESTAMP, LOCALTIME, LOCALTIMESTAMP
- DATE
- DATEDIFF
- DATE_SUB, SUBDATE
- DAY, DAYOFMONTH
- DAYOFWEEK
- DAYOFYEAR
- EXTRACT
- FROM_DAYS
- FROM_TZ
- FROM_UNIXTIME
- HOUR
- LAST_DAY
- MAKEDATE
- MAKETIME
- MINUTE
- MONTH
- MONTHS_BETWEEN
- NEW_TIME
- QUARTER
- ROUND
- SEC_TO_TIME
- SECOND
- SYS_DATE, SYSDATE
- SYS_DATETIME, SYSDATETIME
- SYS_TIME, SYSTIME
- SYS_TIMESTAMP, SYSTIMESTAMP
- TIME
- TIME_TO_SEC
- TIMEDIFF
- TIMESTAMP
- TO_DAYS
- TRUNC
- TZ_OFFSET
- UNIX_TIMESTAMP
- UTC_DATE
- UTC_TIME
- WEEK
- WEEKDAY
- YEAR
- LOB Functions
- Data Type Casting Functions and Operators
- Aggregate/Analytic Functions
- Overview
- Aggregate vs. Analytic
- Analytic functions which "ORDER BY" clause must be specified in OVER function
- AVG
- COUNT
- CUME_DIST
- DENSE_RANK
- FIRST_VALUE
- GROUP_CONCAT
- LAG
- LAST_VALUE
- LEAD
- MAX
- MEDIAN
- MIN
- NTH_VALUE
- NTILE
- PERCENT_RANK
- PERCENTILE_CONT
- PERCENTILE_DISC
- RANK
- ROW_NUMBER
- STDDEV, STDDEV_POP
- STDDEV_SAMP
- SUM
- VARIANCE, VAR_POP
- VAR_SAMP
- Click Counter Functions
- ROWNUM Functions
- Information Functions
- Encryption Function
- Comparison Expression
- Comparison Functions
- Other functions
- Data Manipulation Statements
- Query Optimization
- Partitioning
- Globalization
- An Overview of Globalization
- Locale Setting
- Step 1: Selecting a Locale
- Step 2: Compiling Locale
- Step 3: Setting CUBRID to Use a Specific Locale
- Step 4: Creating a Database with the Selected Locale Setting
- Step 5 (optional): Manually Verifying the Locale File
- Step 6: Starting CUBRID-Related Processes
- Synchronization of Database Collations with System Collations
- Collation
- Charset and Collation of Column
- Charset and Collation of Tables
- Charset and Collation of String Literals
- Charset and Collation of Expressions
- Charset and Collation of System Data
- Impact of Charset Specified When Creating DB
- String literal input and output
- Contraction and Expansion of Collation
- Operations Requiring Collation and Charset
- Collation settings impacting CUBRID features
- Viewing Collation Information
- Using i18n characters with JDBC
- Timezone Setting
- Configuration Guide for Characters
- Remark
- Guide for Adding Locales and Collations
- Transaction and Lock
- Trigger
- Java Stored Function/Procedure
- Method
- Class Inheritance
- Database Administration
- System Catalog